  <?php
  	if(isset($_GET['uid'])&&intval($_GET['uid'])>0)
	{
		$uid=intval($_GET['uid']);
	}
	else
	{
		if($logid!=false)
			$uid=$logid;
		else
			edp_redirect(edp_href_link(PAGENAME_PAGE_NOT_FOUND));
	}
  ?>
  <div class="main_box">
    	<div class="left_bar">
        <!--*********************-->
        	<div class="order_box">
            	<h1></h1>
                <h2>
                	<div class="ordertitle"><?php secho( $user ); ?>的好友圈(<?php echo $friendCount;?>)</div>
                    <div class="orderlink">
                      <form id="sortform" action="<?php echo edp_href_link(PAGENAME_USER_FRIEND, 'uid='.$uid);?>" method="GET">
						<input type="hidden" id="sortby" name="sortby" value="<?php echo $sortby;?>" />
						<input type="hidden" id="order" name="order" value="<?php echo $order;?>" />
                    	
                    	<div class="orderlinktxt">
                        	排序：<a id="sort_nick" href="#">昵称</a>|<a id="sort_contribution" href="#">贡献度</a>
                        </div>
                       <div class="orderbutton"> <a href="#" id="order_asc" ><img src="<?php echo IMAGE_DIR; ?>arrow4.gif" /></a></div>
                       <div class="orderbutton"><a href="#" id="order_desc"  ><img src="<?php echo IMAGE_DIR; ?>arrow5.gif" /></a></div>
                      </form>  
                    </div>
                </h2>
                <h3></h3>
            </div>
             <!--*********************-->
            <div class="friend_box">
            	<div class="friend_box1">
			<?php
			
			 if($friendList){
					
			 	$num = 0;
			 ?>
			 <div class="friend_box2">
			 <?php	
				foreach($friendList as $friend){
					
			?>           	

                        <dl class="friend_item_box">
						<dd>
                            <h1>
                              <a href="<?php echo edp_href_link(PAGENAME_USER_INFO, 'uid='.$friend['id'])?>">
                                 <?php secho( $friend['nick'] ); ?>
                              </a>
                            </h1>
                             <div class="degree_box">                          	
                                <div class="degree_icon_<? echo getUserRankClass($friend['contribution']); ?>"></div>
                             </div>
							 <div class="send">
							 <a name="<?php echo $friend['id'].'_'.$friend['nick'];?>" class="send_msg" href="#">发站内信</a> | 
							<?php
									if($logid&&$logid==$uid)
									{
							?>
										<a name="<?php echo $friend['id'].'_'.$friend['nick'];?>" class="del_friend" href="#">删除好友</a><br/>
							<?php
									}
									else
									{
							?>
										<a name="<?php echo $friend['id'].'_'.$friend['nick'];?>" class="add_friend" href="#">加为好友</a><br/>
							<?php
									}
							?>	 
							</div>
                         </dd>     
                         <dt>
                            <a href="<?php echo edp_href_link(PAGENAME_USER_INFO, 'uid='.$friend['id'])?>">
                             <img src="<?php echo EdpGetAvatarUrl($friend['logo_path']);?>" width="80" height="80"  class="item_list_pic_friend"/>
                             </a>
                         </dt>                                              
                        </dl>

		 	<?php 
		 		  $num++;
		 		  
		 		  if(($num)%3==0){//1行3个
					  echo '</div><div class="friend_box2">';		 		  
		 		  }		 		  
				 }
         	  ?>
         	  </div>
         	<?php 
			  }	
		 	?>

       		  </div>
          </div>

        <!--*************************************-->
        <div class="friend_box_bottomline"></div>
             <!--****************************************-->
             <div class="pagebox">
				<?php echo $pageObj->getBar();  ?>              
             </div>
        <!--*************************************-->
      </div>
        <div class="right_bar">
        	<dl class="friend_search_box">
        	<form method="post" action="#" id="friend_search_form">
            	<dt>搜索本站注册会员</dt>
               <!--   <dd><input name="" type="radio" value=""/><span>Email</span><input name="" type="radio" value="" /><span>会员名</span></dd> -->
				<dd><input id="friend_account" name="friend_account" type="text" /></dd>
				<dd><input type="button" id="friend_search_submit"  class="btn_1" value="搜 索"/></dd>
            </dl>
            </form>
          <dl class="friend_invite_box">
			<form action="<?php echo edp_href_link(PAGENAME_INVITE_FRIEND, 'redir='.urlencode(edp_href_link(PAGENAME_USER_FRIEND, 'uid='.$uid)));?>" method="post" id="friend_invite_form">
				<input type="hidden" name="action" value="invite_friend"/>
		          
            	<dt><img src="<?php echo IMAGE_DIR; ?>face.gif" /> 邀请您的好友加入，获取贡献值！<a href="#">贡献值的用处</a></dt>
            	<dd>好友Email地址：</dd>           	
                <dd><input type="text" id="friend_email" name="friend_email" /></dd>
                <dd>(多个地址用逗号隔开)</dd>
				<dd><input type="text" id="vcode" class="form_text" name="vcode"/>
					<img id="vimg" src="<?php echo edp_href_link(PAGENAME_VCODE,'tiny=1'); ?>" />
					<a href="javascript:refresh_vcode('vcode/?tiny='+Math.random());">看不清？</a></dd> 
		
				<dd><input id="friend_invite_submit" type="submit" class="btn_1" value="邀 请"/></dd>
				
                </form>
          </dl>
			
          
      </div>

<div id="PopBox" style="display:none;cursor:default;" class="popup"></div>

